from Util.InIManager import iniManager

"""
    @author LiuBoyuan
    DESCRIPTION
    设置配置操作接口    
"""


class SettingControlHandle:
    SettingInIManager = iniManager("Setting.ini")  # 设置配置文件的配置文件

    @classmethod
    def saveDas(cls, queCount=None, timeExam=None, wordCount=None):
        """
        保存数据
        @param queCount:
        @param timeExam:
        @param wordCount:
        @return:
        """
        if queCount:
            cls.SettingInIManager.setDas("Setting", 'QuestionCount', queCount)
        if timeExam:
            cls.SettingInIManager.setDas("Setting", "AskTime", timeExam)
        if wordCount:
            cls.SettingInIManager.setDas("Setting", "WordCount", wordCount)
